<!doctype html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title th:text="${config.siteName}+' - 管理中心'"></title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
    <!--<script src="https://open.mobile.qq.com/sdk/qqapi.js?_bid=152"></script>-->
    <!--<script src="/file/qq.file"></script>-->
</head>
<body>
<!-- 顶部开始 -->
<div class="container">
    <div class="logo"><a href="/admin">管理中心</a></div>
    <div class="left_open">
        <i title="展开左侧栏" class="iconfont">&#xe699;</i>
    </div>
    <ul class="layui-nav right" >
        <li class="layui-nav-item to-index"><a href="/" target="_blank">官网首页</a></li>
        <li class="layui-nav-item to-index"><a href="/doc.do" target="_blank">开发文档</a></li>
        <li class="layui-nav-item to-index"><a th:href="'/quickpass?id='+${user.id}" target="_blank">支付测试</a></li>
        <li class="layui-nav-item">
            <a href="javascript:void(0);" th:text="${user.showname}"></a>
            <dl class="layui-nav-child"> <!-- 二级菜单 -->
                <dd><a href="javascript:void(0);" onclick="log_out_111();">退出</a></dd>
            </dl>
        </li>
    </ul>
</div>
<div class="left-nav">
    <div id="side-nav">
        <ul id="nav">
            <th:block th:each="obj,state:${menu}">
                <li>
                    <a th:attr="_href=${obj.funPath}" >
                        <i class="iconfont">&#xe723;</i>
                        <cite th:text="${obj.funName}"></cite>
                        <th:block th:if="${!#lists.isEmpty(obj.sub_menu)}">
                            <i class="iconfont nav_right">&#xe697;</i>
                        </th:block>
                    </a>
                    <th:block th:if="${!#lists.isEmpty(obj.sub_menu)}">
                        <ul class="sub-menu">
                            <th:block th:each="obj2,state:${obj.sub_menu}">
                                <li>
                                    <a th:attr="_href=${obj2.funPath}">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite th:text="${obj2.funName}"></cite>
                                    </a>
                                </li>
                            </th:block>
                        </ul>
                    </th:block>
            </th:block>
        </ul>
    </div>
</div>
<div class="page-content">
    <th:block th:if="${user.role == 1}">
        <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
            <ul class="layui-tab-title">
                <li>首页</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe src='/admin/welcomepage' frameborder="0" scrolling="yes" class="x-iframe" ></iframe>
                </div>
            </div>
        </div>
    </th:block>
    <th:block th:if="${user.role != 1}">
        <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
            <ul class="layui-tab-title">
                <li>用户中心</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe src='/admin/user/info' frameborder="0" scrolling="yes" class="x-iframe" ></iframe>
                </div>
            </div>
        </div>
    </th:block>
</div>
<div class="page-content-bg"></div>
<div class="footer">
    <div class="copyright">Copyright ©2019
        <span th:text="${config.siteName}"></span> All Rights Reserved.&nbsp;
        技术支持:<span style="color: #48ffff;" th:text="'QQ'+${config.kfqq}"></span></span>
    </div>
</div>
<script>


    function log_out_111() {
        layer.confirm("确认要退出吗?", function () {
            $.post("/admin/logout/ajax",
                {"times": new Date().getTime()},
                function (data) {
                    layer.msg(data.msg);
                    setTimeout(function () {
                        location.href = "/admin/login?times=" + new Date().getTime();
                    }, 800);
                }, "json");
        });
    }

</script>
</body>
</html>